package com.saicmotor.pay;

import com.saicmotor.pay.entity.OrderEntity;
import com.saicmotor.pay.entity.PayEntity;
import com.saicmotor.pay.entity.PayResultEntity;
import com.saicmotor.pay.request.OrderSubmitRequest;
import com.saicmotor.pay.request.PayOrderRequest;
import com.saicmotor.pay.request.QueryPayResultRequest;
import com.zone.sdk.common.http.base.BaseRequest;
import com.zone.sdk.common.http.base.Result;

import java.util.List;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface ICloudOrderPayService {

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("order/order/create")
    Observable<Result<OrderEntity>> submitOrder(@Body OrderSubmitRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("ags/public/trans/appendpayrecord/v1")
    Observable<Result<PayEntity>> payOrder(@Body PayOrderRequest request);

    @Headers({"Content-Type: application/json;charset=utf-8",
            "Accept: application/json;charset=utf-8"})
    @POST("ags/remote/trans/querytranstatus/v1")
    Observable<Result<PayResultEntity>> queryPayResult(@Body QueryPayResultRequest request);

}
